# -*- coding: utf-8 -*-

# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html

from peewee import *


db = MySQLDatabase('wenshu',
                   host="10.103.17.232",    # your host, usually
                   user="root",         # your username
                   passwd="123456",  # your password
                   )

class Wenshu(Model):
    title = CharField(null=True)
    anhao = CharField(null=True)
    docid = CharField(null=True)
    date = DateTimeField(null=True)
    content = TextField(null=True)

    class Meta:
        database = db

def main():
    db.connect()
    db.create_tables([
        Wenshu
    ])


if __name__ == '__main__':
    main()
